//$(function () {
//    var sin = [], cos = [];
//    for (var i = 0; i < 10; i += 0.5) {
//        sin.push([i, Math.sin(i)]);
//        cos.push([i, Math.cos(i)]);
//    }

//    var plot = $.plot($("#line-chart"),
//           [ { data: sin, label: "sin(x)"}, { data: cos, label: "cos(x)" } ], {
//               series: {
//                   lines: { show: true },
//                   points: { show: true }
//               },
//               
//               grid: { hoverable: true, clickable: true },
//               yaxis: { min: -1.1, max: 1.1 },
//			   xaxis: { min: 0, max: 9 },
//    	colors: ["#F90", "#3C4049", "#666", "#BBB"]
//             });
//});

function drawLine(t, d) {
    var plot = $.plot(t,
           d, {
               series: {
                   lines: { show: true },
                   points: { show: true }
               },

               grid: { hoverable: true, clickable: true },
               //yaxis: { min: -1.1, max: 1.1 },
               yaxis: { min: null, max: null },
               xaxis: { mode: "time"}//, timeformat: "%y-%m-%d", minTickSize: [1, "day"]
               //xaxis: { mode: "time",timeformat: "%y-%m-%d", minTickSize: [1, "day"],min: mintime, max: maxtime}
               //xaxis: { min: 0, max: 9 },
               //colors: ["#F90", "#3C4049", "#666", "#BBB"]
           });
}

function drawLineWithAngle(t, d, a) {
    var plot = $.plot(t,
           d, {
               series: {
                   lines: { show: true },
                   points: { show: true }
               },

               grid: { hoverable: true, clickable: true },
               yaxis: { min: null, max: null },
               xaxis: { mode: "time", rotateTicks: a}//, timeformat: "%y-%m-%d", minTickSize: [1, "day"]
           });
}

//function drawLines(t, d) {
//    var plot = $.plot(t,
//           d, {
//               series: {
//                   lines: { show: true },
//                   points: { show: true }
//               },

//               grid: { hoverable: true, clickable: true },
//               //yaxis: { min: -1.1, max: 1.1 },
//               yaxis: { min: null, max: null },
//               xaxis: { mode: "time"}//, timeformat: "%y-%m-%d", minTickSize: [1, "day"]
//               //xaxis: { mode: "time",timeformat: "%y-%m-%d", minTickSize: [1, "day"],min: mintime, max: maxtime}
//               //xaxis: { min: 0, max: 9 },
//               //colors: ["#F90", "#3C4049", "#666", "#BBB"]
//           });
//}

//function (id,data) {
//    var sin = [], cos = [];
//    for (var i = 0; i < 10; i += 0.5) {
//        sin.push([i, Math.sin(i)]);
//        cos.push([i, Math.cos(i)]);
//    }

//    var plot = $.plot($("#" + id),
//           [{ data: sin, label: "sin(x)" }, { data: cos, label: "cos(x)"}], {
//               series: {
//                   lines: { show: true },
//                   points: { show: true }
//               },

//               grid: { hoverable: true, clickable: true },
//               yaxis: { min: -1.1, max: 1.1 },
//               xaxis: { min: 0, max: 9 },
//               colors: ["#F90", "#3C4049", "#666", "#BBB"]
//           });
//}